Xbasic

SQL::UpdateStatementParse Method

Syntax

Result_Flag as L = Parse([SQLStatement as C])

Arguments

Result_Flag

TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).

SQL::UpdateStatement

A SQL::UpdateStatement object.

SQLStatement

Optional. A Portable SQL statement.

Description

Parse the SQLStatement passed (or the value previously set into the SQLStatement property).

Discussion

The .Parse() method parses the SQL_Statement string (or the value previously set into the SQL::UpdateStatement.SQLStatement property).

Example

dim conn as SQL::Connection
dim connString as C
dim upd as SQL::UpdateStatement
dim sql_update as C
connString = "{A5API='Access', FileName='c:\program files\a5v7\mdbfiles\alphasports.mdb'}"
sql_update = "update customer set bill_city = 'Phoenix', bill_postal_code = '08000', bill_state_region = 'AZ' where customer_id = 1"
if .not. conn.open(connString) then
    end
end if
if .not. upd.parse(sql_update) then
    ui_msg_box("Error", upd.callresult.text)
    end
end if
if .not. upd.execute(conn) then
    end
end if

See Also